<% 
    String files[]={"upload/1657319_orig01.jpg","1341003_orig.jpg"};
            
    String id=request.getParameter("id" );
    String filename="g:/upload/1657319_orig01.jpg";
   if(id !=null)
       filename="g:/upload/" +files[Integer.parseInt(id)];
    System.out.println( application.getMimeType(filename) );
    response.setContentType(application.getMimeType(filename));
    java.io.OutputStream os=response.getOutputStream();
	java.io.FileInputStream is=new java.io.FileInputStream(filename);
	
	int byteread=0;
	while((byteread=is.read())!=-1){
		os.write(byteread);
	}
	is.close();
	os.flush();
%>

